class NotIntegerError(Exception):
    """自定义异常: 输入的值不是整型数"""
    pass


class NotSymmetricError(Exception):
    """自定义异常: 输入的值不是对称数"""
    pass


def is_symmetric_number(number):
    """判断一个整型数是否是对称数"""
    num_str = str(number)
    return num_str == num_str[::-1]


def main():
    try:
        user_input = input("请输入一个整数: ")
        if not user_input.isdigit() and not (user_input.startswith('-') and user_input[1:].isdigit()):
            raise NotIntegerError("输入的内容不是一个整型数！")

        number = int(user_input)
        if not is_symmetric_number(number):
            raise NotSymmetricError(f"{number} 不是对称数！")

        print(f"{number} 是对称数！")

    except NotIntegerError as e:
        print(e)
    except NotSymmetricError as e:
        print(e)


if __name__ == "__main__":
    main()